var Layer = function()
{
	this.init();
}


Layer.prototype.init = function()
{
	this.displayList = new Array();
	this.visible = true;
}

Layer.prototype.addChild = function(child)
{
	this.displayList.push(child);
}

Layer.prototype.removeChild = function(child)
{
	this.displayList.splice(this.displayList.indexOf(child), 1);
}

Layer.prototype.hide = function()
{
	this.visible = false;
	for(var i=0;i<this.displayList.length;i+=1)
	{
		obj = this.displayList[i];
		obj.visible = false;
	}
}

Layer.prototype.show = function()
{
	this.visible = true;
	for(var i=0;i<this.displayList.length;i+=1)
	{
		obj = this.displayList[i];
		obj.visible = true;
	}
}